<?php
error_reporting(E_ERROR);
session_start();
include 'csm-update/flag.php';
if(!IS_INSTALL){
	header('Location:csm-update/');
}
//项目空间
define('APP_SPACE','csm');
//是否显示
define('SHOW_ERROR', true);
//release or dev
define('RUN_MODEL','dev');
define('CURR_USER', 'nobody');
date_default_timezone_set ('Asia/Shanghai');
//phpinfo();
//define('DEFAULT_DB_GROUP', 'sms');

//跟目录
define('ROOT_PATH', realpath(dirname(__FILE__) . '/../../') . '/');
define('APP_PATH', realpath(dirname(__FILE__) . '/../') . '/');
define('JYAPI_PATH',ROOT_PATH.'JYAPI/');
//应用配置
include (APP_PATH . 'config/CKConfig.class.php');

include(JYAPI_PATH.'JYAPI.php');
//自动载入方法
require_once JYAPI_PATH.'autoload/JYAutoload.class.php';
JYAutoload::getInstance()->addDir(APP_PATH.'lib/');
JYAutoload::getInstance()->addDir(APP_PATH.'component/');
JYAutoload::getInstance()->execute();
header("Content-type:text/html;charset=utf-8");
try {
	JYDispatcher::createInstance()->dispatch();
} catch(Exception $e) {
	header("HTTP/1.1 404 Page Not Found.");
	echo $e->getMessage();
}

?>
